<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./jq-3.6.0.js"></script>
    <style>
        .header {
            display: flex;
            width: 400px;
            text-align: center;
            background-color: rgb(203, 203, 200);
        }
        
        .header div {
            height: 50px;
            line-height: 50px;
            flex: 1;
        }
        
        .item-concent {
            display: none;
        }
        
        .show {
            display: block;
        }
        
        .change {
            background-color: red;
            color: rgb(255, 255, 255);
        }
    </style>
</head>

<body>
    <div class="header">
        <div class="item">商品</div>
        <div class="item">包装</div>
        <div class="item">规格</div>
        <div class="item">评价</div>
    </div>
    <div class="main">
        <div class="item-concent">商品的内容</div>
        <div class="item-concent">包装的内容</div>
        <div class="item-concent">规格的内容</div>
        <div class="item-concent">评价的内容</div>
    </div>

</body>

<script>
    $(".item").click(function() {
        $(this).addClass("change").siblings().removeClass("change");
        $($('.item-concent').get($(this).index())).addClass('show').siblings().removeClass('show')
    });
</script>

</html>